Skip to content

refactor: newline-per-line progress output#33

Merged
TonyCasey merged 3 commits intomainfrom
git-64-newline-progress
Feb 13, 2026
Merged

refactor: newline-per-line progress output#33
TonyCasey merged 3 commits intomainfrom
git-64-newline-progress

Conversation

@TonyCasey
Copy link
Copy Markdown
Owner

@TonyCasey TonyCasey commented Feb 12, 2026

Summary

  • Simplifies progress handler to write each update on its own line instead of using \r in-place replacement
  • Removes TTY detection, padEnd line clearing, and liberateWithProgress try/finally wrapper
  • Cleaner output that works identically in all environments (terminal, CI, piped)

Follow-up to #32 (GIT-64)

Test plan

  • npm run pre-commit passes
  • All 314 tests pass

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor

    • Simplified internal progress handling for relevant commands.
  • User-facing changes

    • Progress updates now print as separate newline lines instead of updating in place.
    • Final summary now prints a concluding "Done — X facts extracted from Y commits." line.
    • Console message updated to "Extracting knowledge..." during processing.
    • Command now validates inputs and warns if enrichment is requested but no language model is available.

… (GIT-64)

Simplifies progress handler to always write each update on its own line.
Removes TTY detection, padEnd line clearing, and liberateWithProgress
try/finally wrapper — none needed with newline output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 12, 2026 23:30
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

Removed the liberateWithProgress wrapper and TTY in-place updates; commands now call liberateService.liberate directly with inline onProgress: createStderrProgressHandler(). Added input parsing/validation, since-to-Date conversion, an enrich-without-LLM warning, and more invocation logging; progress lines are newline-terminated.

Changes

Cohort / File(s) Summary
Command callers
src/commands/init.ts, src/commands/liberate.ts
Replaced liberateWithProgress usage with direct liberateService.liberate(...) call passing onProgress: createStderrProgressHandler() inline; updated console message text, added parsing/validation for commitCount/threshold, sinceDate, invocation logging, and a warning when enrich is requested without an LLM client.
Progress output
src/commands/progress.ts
Removed TTY-aware in-place formatting state and liberateWithProgress wrapper. Progress events now print newline-terminated processing lines and a final completion line; simplified progress handler implementation.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'refactor: newline-per-line progress output' accurately describes the main change: converting progress output from in-place carriage-return updates to newline-terminated lines across three modified files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch git-64-newline-progress

No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the CLI liberate progress output to always emit newline-delimited updates to stderr, removing TTY/in-place update logic so output is consistent across terminals, CI, and piped runs.

Changes:

  • Simplifies createStderrProgressHandler to write one progress update per line (no \r in-place updates).
  • Removes the liberateWithProgress wrapper and updates init/liberate commands to pass the handler directly.
  • Drops TTY detection and line-padding/clearing logic.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/commands/progress.ts Simplifies stderr progress handling to always write newline-delimited updates and removes the wrapper helper.
src/commands/liberate.ts Removes usage of liberateWithProgress and passes the stderr progress handler directly to the service.
src/commands/init.ts Removes usage of liberateWithProgress and passes the stderr progress handler directly to the service.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/commands/progress.ts
TonyCasey and others added 2 commits February 13, 2026 08:18
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 13, 2026 08:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TonyCasey TonyCasey merged commit 56701d0 into main Feb 13, 2026
9 checks passed
@TonyCasey TonyCasey deleted the git-64-newline-progress branch February 13, 2026 08:34
@TonyCasey TonyCasey restored the git-64-newline-progress branch February 14, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants